package com.xbongbong.saas.model.impl;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.saas.domain.dao.WarehouseOristockDao;
import com.xbongbong.saas.domain.dao.WarehouseOristockProductDao;
import com.xbongbong.saas.domain.entity.WarehouseOristockEntity;
import com.xbongbong.saas.domain.entity.WarehouseOristockProductEntity;
import com.xbongbong.saas.model.WarehouseOristockProductModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Program xbb-pro
 * @Description
 * @Author caoyy
 * @Date 2019/10/17
 **/
@Service
public class WarehouseOristockProductModelImpl implements WarehouseOristockProductModel {
    @Resource
    private WarehouseOristockProductDao warehouseOristockProductDao;

    @Override
    public Integer insert(WarehouseOristockProductEntity entity) throws XbbException {
        return warehouseOristockProductDao.insert(entity);
    }

    @Override
    public void insertBatch(List<WarehouseOristockProductEntity> warehouseOristockProductEntityList) {
        warehouseOristockProductDao.insertBatch(warehouseOristockProductEntityList);
    }

    @Override
    public Integer update(WarehouseOristockProductEntity entity) throws XbbException {
        return null;
    }

    @Override
    public List findEntitys(Map<String, Object> param) {
        return warehouseOristockProductDao.findEntitys(param);
    }

    @Override
    public Integer getEntitysCount(Map<String, Object> param) {
        return warehouseOristockProductDao.getEntitysCount(param);
    }

    @Override
    public List findEntitysWithoutSub(Map<String, Object> param) {
        return null;
    }

    @Override
    public void deleteByOriId(String corpid, List<Integer> oriIdList) {
        warehouseOristockProductDao.deleteByOriId(corpid,oriIdList);
    }

    @Override
    public List<WarehouseOristockProductEntity> getProductsByOriStockIdIn(String corpid, List<Long> oriStockIdIn) {
        return warehouseOristockProductDao.getProductsByOriStockIdIn(corpid, oriStockIdIn);
    }
}
